StillDown
StillDown See if the button stayed down after it was last pressed
#include <Events.h> Event Manager
returns Is button still down since last mouseDown?
StillDown checks if the mouse button has been continuously pressed since
the most recent mouseDown event.
Returns: a Boolean value reporting activity since the most recent mouseDown.
It is one of:
FALSE button is up or there are one or more mouse events pending
in the queue. It is not "still down".
TRUE button is down and it has not been released since the most
recent mouseDown. It is "still down".

Notes: StillDown is normally called directly after detecting a mouseDown event
via GetNextEvent or WaitNextEvent. It lets you know if the mouse is
being dragged. To process the dragging, call WaitMouseUp repeatedly in a
loop; e.g.:
Point oldPt, newPt;
switch ( theEvent.what ) {
case mouseDown:
oldPt= theEvent.where;
GlobalToLocal( &oldPt );
if ( StillDown() ) {
while ( WaitMouseUp() ) {
GetMouse( &newPt);
if ( DeltaPoint(oldPt, newPt) ) { // moved ?
EraseRect( &r ); // erase old pos
OffsetRect( &r, newPt.h-oldPt.h, newPt.v-oldPt.v );
DrawPicture( thePic, &r ); // draw at new
oldPt=newPt;
}
}
}
else {
/*... process normal (non-dragging) mouseDown . . .*/
}
break;
case keyDown:
/* etc */
The advantage of testing the loop via WaitMouseUp rather than
StillDown is that it removes the mouseUp event from the queue and
simplifies checking for double clicks (see GetDblTime).
You can also test the state of the button via Button, but that function does
not indicate whether the button has been released and pressed between calls.